package com.chilly.other.pattern.template;

/**
 * Created by Chilly Cui on 2020/12/11.
 */
public abstract class NoticeTemplate {
    private String byType;

    public NoticeTemplate(String byType) {
        this.byType = byType;
        System.out.println("发送方式为：" + byType);
    }

    public final void send() {
        //消息发送方
        //消息接收方
        //构建消息
        //发送消息
        sender();
        receiver();
        buildNotice();
        sendNotice();
    }

    protected abstract void sendNotice();

    protected abstract void buildNotice();

    protected abstract void receiver();

    protected abstract void sender();
}
